var e = function(e) {
    return (e = e.toString())[1] ? e : "0" + e;
};

module.exports = {
    formatTime: function(i) {
        var t = i.getFullYear(), o = i.getMonth() + 1, g = i.getDate(), n = i.getHours(), l = i.getMinutes(), a = i.getSeconds();
        return [ t, o, g ].map(e).join("/") + " " + [ n, l, a ].map(e).join(":");
    }
}, module.exports = {
    imageUtil: function(e) {
        var i = {}, t = e.detail.width, o = e.detail.height, g = o / t;
        return console.log("originalWidth: " + t), console.log("originalHeight: " + o), 
        wx.getSystemInfo({
            success: function(e) {
                var n = e.windowWidth, l = e.windowHeight, a = l / n;
                console.log("windowWidth: " + n), console.log("windowHeight: " + l), g < a ? (i.imageWidth = n, 
                i.imageHeight = n * o / t) : (i.imageHeight = l, i.imageWidth = l * t / o);
            }
        }), console.log("缩放后的宽: " + i.imageWidth), console.log("缩放后的高: " + i.imageHeight), 
        i;
    }
};